import requests
import baozou_insert_sql
import re
def baozou1():
    r = requests.session()
    url = "https://www.bzcps.com/admin/checklogin.html"
    date ={
        "account" : "",
        "password" : "",
    }
    Platform = "暴走1_媚色小说"
    rr = r.post(url = url,data = date)
    aa = r.get(url="https://www.bzcps.com/index/report/dayincome.html")
    aa = aa.text.replace('\n','').replace('\t','').replace('\r','')
    date_time = re.findall('<td class="txt_l">(.*?)</td>',aa)
    # print(date_time[2])
    Amount_share = re.findall('<span class="c-red">￥(.*?)</span>',aa)
    # print(Amount_share[4])
    #数据入库
    try:
            baozou_insert_sql.baozou_spider_everyday_sum(date_time[2],Amount_share[4],Platform)
    except  Exception:
            print("数据入库失败")

